#include <stdio.h>
int main() {
	int n, j;
	char ch[80], tran[80];
	printf("Please cipher code: ");
	gets_s(ch);
	printf("\ncipher code: %s", ch);
	j = 0;
	while (ch[j] != '\0') {
		if ((ch[j] > 'A') && (ch[j] < 'Z'))
			tran[j] = 155 - ch[j];     // 91 - ch[j] + 64 = 155 - ch[j]
		else if ((ch[j] > 'a') && (ch[j] < 'z'))
			tran[j] = 219 - ch[j];     // 26 + 96 - ch[j] + 96 + 1 = 219 - ch[j]
		else
			tran[j] = ch[j];
		j++;
	}
	n = j;
	printf("\noriginal text: ");
	for (j = 0; j < n; j++) {
		putchar(tran[j]);
	}
	printf("\n");
	return 0;
}